﻿using MSSClient.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace MSSClient
{
    /// <summary>
    /// Interaction logic for RenameDlg.xaml
    /// </summary>
    public partial class RenameDlg : Window
    {
        public delegate void RenameDelegate(string renameText);
        public RenameDelegate renameDelegateObj;

        public RenameDlg(string renameText)
        {
            InitializeComponent();
            textBox.Text = renameText;
        }

        private void button_Click(object sender, RoutedEventArgs e)
        {
            if ("" == textBox.Text)
            {
                CommonUtil.ShowMsgFrom("请先输入名称！");
                return;
            }
            renameDelegateObj(textBox.Text.Trim());
        }
        private void button_close_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
